﻿Public Class Start

    Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
        Application.Exit()
    End Sub

    Private Sub BtnProduct_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnProduct.Click
        Product.Show()
        Me.Close()
    End Sub

    Private Sub BtnStaff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnStaff.Click
        Employee.Show()
        Me.Close()
    End Sub

    Private Sub BtnCustomer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCustomer.Click
        Customer.Show()
        Me.Close()
    End Sub

    Private Sub BtnSales_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSales.Click
        Sales.Show()
        Me.Close()
    End Sub

    Private Sub BtnOrder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOrder.Click
        Orders.Show()
        Me.Close()
    End Sub

    Private Sub Start_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        LblDate.Text = DateTime.Now.ToLongDateString()
        LblTime.Text = DateTime.Now.ToString("HH:mm")

    End Sub

    Private Sub StaffMembersToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StaffMembersToolStripMenuItem1.Click
        Employee.Show()
        Me.Close()
    End Sub

    Private Sub SalesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SalesToolStripMenuItem1.Click
        Sales.Show()
        Me.Close()
    End Sub

    Private Sub OrdersToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OrdersToolStripMenuItem1.Click
        Orders.Show()
        Me.Close()
    End Sub

    Private Sub ProductsToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProductsToolStripMenuItem1.Click
        Product.Show()
        Me.Close()
    End Sub

    Private Sub ChooseLanguageToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChooseLanguageToolStripMenuItem.Click
        Language.Show()
        Me.Close()
    End Sub

    Private Sub HelpToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HelpToolStripMenuItem1.Click
        Help.Show()
        Me.Close()
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs)
        Dim connection As New System.Data.SqlClient.SqlConnection("Database=bartek;Server=.\SQLEXPRESS;Integrated Security=True;")

        Dim command As New System.Data.SqlClient.SqlCommand()
        command.CommandText = "SELECT * FROM person"
        command.Connection = connection

        connection.Open()
        Dim tmp = command.ExecuteReader()
        connection.Close()

    End Sub

    Private Sub Label2_Click(sender As System.Object, e As System.EventArgs) Handles LblDate.Click

    End Sub
End Class